package com.lianboke.link.ad.utils;

import android.text.TextUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by admin on 2017/9/14.
 */

public class StringUtils {

    public static String[] getArrayByString(String split ,String content){
        if(TextUtils.isEmpty(content)){
            return null;
        }else {
            String[] strArr = content.split(split);
            return strArr;
        }
    }

    public static String getIpAddresByWJ(String content){
        if(TextUtils.isEmpty(content)){
            return "";
        }
        Pattern p =Pattern.compile("^\\d+\\:(.*)[-]{2}.*", Pattern.DOTALL);
        Matcher m = p.matcher(content);
        if(m.find()){
            return m.group(1);
        }else {
            return "";
        }


    }
}
